<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>博客系统-后台登录</title>
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <!-- <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>"> -->

  <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
  <?php echo $__env->make('admin.public.style', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
  <?php echo $__env->make('admin.public.script', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

</head>
<body class="login-bg">
    
    <div class="login">
        <div class="message">博客系统-管理登录</div>
        <!-- <?php if(count($errors) > 0): ?>
          <div class="alert alert-danger">
            <ul>
              <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <li><?php echo e($error); ?></li>
              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </ul>
          </div>
        <?php endif; ?> -->
        <div id="darkbannerwrap"></div>
        
        <form method="post" class="layui-form" action="<?php echo e(url('/admin/doLogin')); ?>">
            <?php echo e(csrf_field()); ?>

            <input name="username" placeholder="用户名"  type="text" lay-verify="required|username" class="layui-input" >
            <hr class="hr15">
            <input name="password" lay-verify="required|password" placeholder="密码"  type="password" class="layui-input">
            <hr class="hr15">
            <!-- <input name="captcha" style="width: 150px;height: 40px;float: left;" lay-verify="required" placeholder="验证码"  type="text" class="layui-input">
            <img src="<?php echo e(url('/admin/code')); ?>" style="float: right;" onclick="this.src='<?php echo e(url('/admin/code')); ?>?'+Math.random()"> -->
            <input name="captcha"  lay-verify="captcha" style="width: 200px;height: 40px;float: left;" type="text" placeholder="验证码" class="layui-input">  
            <a onclick="javascript:re_captcha();">  
            <img src="<?php echo e(URL('/code/captcha/1')); ?>" id="127ddf0de5a04167a9e427d883690ff6" style="float: right;">  
            </a>  
            <hr class="hr15">
            <input value="登录" lay-submit lay-filter="login" style="width:100%;" type="submit">
            <hr class="hr20" >
        </form>
    </div>

    <script type="text/javascript">  
    function re_captcha() {  
        $url = "<?php echo e(URL('/code/captcha')); ?>";
        $url = $url + "/" + Math.random();
            document.getElementById('127ddf0de5a04167a9e427d883690ff6').src = $url;
        }
    </script> 

    <script>
        $(function  () {
            layui.use('form', function(){
              var form = layui.form;

              form.verify({
                  username: [/(.+){2,20}$/, '用户名长度在 4-20 之间'], 
                  password: [/(.+){6,12}$/, '密码长度在 6-12 之间'],
                  captcha: [/[\S]+/, "验证码不能为空"]
              });
              // layer.msg('玩命卖萌中', function(){
              //   //关闭后的操作
              //   });
              //监听提交
              // form.on('submit(login)', function(data){
              //   // alert(888)
              //   layer.msg(JSON.stringify(data.field),function(){
              //       location.href='/admin/doLogin'
              //   });
              //   return false;
              // });
            });  
        })
    </script>

    
    <!-- 底部结束 -->
    <script>
    //百度统计可去掉
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
      var s = document.getElementsByTagName("script")[0]; 
      s.parentNode.insertBefore(hm, s);
    })();
    </script>
</body>
</html>